package com.learn.base.extrat.extrat;


/**
 * 重构初步完成
 *
 * @author: cong zhi
 * @createDate: 2022/4/22 17:16
 * @updateUser: cong zhi
 * @updateDate: 2022/4/22 17:16
 * @updateRemark: 修改内容
 * @version: v1.0
 */
public abstract class Person {

    boolean isMale;

    char code;

    static Person createMale() {
        return new Male();
    }

    static Person createFemale() {
        return new Female();
    }

    protected Person(boolean isMale, char code) {
        this.isMale = isMale;
        this.code = code;
    }
}
